import React, { Component } from 'react';
import { glabalContext } from './common/js/globalData';
const { Consumer } = glabalContext;
class TransferToChild11 extends Component {
  render() {
    return (
      <div>
        {/* 孙子组件也需要读取-父父组件的role数据 */}

        <div style={{ textIndent: '20px' }}>
          这是Child1的子组件,孙子组件
          <Consumer>{(value) => <div>{value.role}</div>}</Consumer>
        </div>
      </div>
    );
  }
}

export default TransferToChild11;
